<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<WebUI.Models.Forms.PermissionsForm>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Administration
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h3>Permissions for Guest Group</h3>
    <%using (Html.BeginForm("Administration", "Permission")) %>
    <%{ %>
    <table>
        <tr>
            <td>
                <h5>
                    Operation</h5>
            </td>
            <td>
                <h5>
                    Allow</h5>
            </td>
            <td>
                <h5>
                    Deny</h5>
            </td>
        </tr>
        <tr>
            <td>
                [Home/Index]
            </td>
<%--            <%if (ViewData.Model != null && ViewData.Model != null)
              { %>--%>
            <%if (ViewData.Model.opHomeIndex)
              { %>
            <td>
                <%=Html.RadioButton("OpHomeIndex", "Allow", true)%>
            </td>
            <td>
                <%=Html.RadioButton("opHomeIndex", "Deny", false)%>
            </td>
            <%} %>
            <%else
                { %>
            <td>
                <%=Html.RadioButton("OpHomeIndex", "Allow", false)%>
            </td>
            <td>
                <%=Html.RadioButton("opHomeIndex", "Deny", true)%>
            </td>
            <%} %>
        </tr>
        <tr>
            <td>
                [Products/List]
            </td>
            <%if (ViewData.Model.opProductsList)
              { %>
            <td>
                <%=Html.RadioButton("OpProductsList", "Allow", true)%>
            </td>
            <td>
                <%=Html.RadioButton("OpProductsList", "Deny", false)%>
            </td>
            <%} %>
            <%else
                { %>
            <td>
                <%=Html.RadioButton("OpProductsList", "Allow", false)%>
            </td>
            <td>
                <%=Html.RadioButton("OpProductsList", "Deny", true)%>
            </td>
            <%} %>
<%--            <%} %>--%>
        </tr>
    </table>
    <br />
    <br />
    <input type="submit" value="Submit" />
    <%} %>
</asp:Content>
